package com.dx.childrenedu.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * @ClassName SysLogPojo
 * @Description 日志实体类
 * @Author xst
 * @Date 2022/11/14 13:35
 * @Version 1.0
 **/
@ApiModel
@Data
@TableName("sys_log")
public class SysLogPojo implements Serializable {
    private static final long serialVersionUID = 1L;
    @TableId(value = "id",type = IdType.AUTO)
    private Long id;
    // 用户名
    @TableField("username")
    private String username;
    // 用户操作
    @TableField("operation")
    private String operation;
    // 请求方法
    @TableField("method")
    private String method;
    // 请求参数
    @TableField("params")
    private String params;
    // 执行时长(毫秒)
    @TableField("time")
    private Long time;
    // IP地址
    @TableField("ip")
    private String ip;
    // 创建时间
    @TableField("create_date")
    @DateTimeFormat(pattern = "yyyy-mm-dd")
    private Date createDate;

    public static long getSerialVersionUID() {
        return serialVersionUID;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getOperation() {
        return operation;
    }

    public void setOperation(String operation) {
        this.operation = operation;
    }

    public String getMethod() {
        return method;
    }

    public void setMethod(String method) {
        this.method = method;
    }

    public String getParams() {
        return params;
    }

    public void setParams(String params) {
        this.params = params;
    }

    public Long getTime() {
        return time;
    }

    public void setTime(Long time) {
        this.time = time;
    }

    public String getIp() {
        return ip;
    }

    public void setIp(String ip) {
        this.ip = ip;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }
}
